package com.example.demo.api.account;

import com.example.demo.bean.vo.RegisterInfo;
import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import retrofit2.http.*;

import java.util.Map;

@RetrofitClient(baseUrl = "${oauth.base}")
public interface OauthApi {
    @POST(value = "/{country}/{lang}/registration/registerAuth")
    String registerAuth(@Path(value = "country") String country, @Path(value = "lang") String lang, @Body RegisterInfo registerInfo);

    @GET("api/profile/public/BaseProfile")
    @Headers({"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"})
    String publicBaseProfile(@Header("Authorization") String authorization);

    @GET("api/profile/BaseProfile")
    @Headers({"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"})
    String bseProfile(@Header("Authorization") String authorization);

    @GET("api/profile/vtex/BaseProfile")
    @Headers({"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"})
    String vtexBseProfile(@Header("Authorization") String authorization);


    @POST("oauth/token")
    @Headers({"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"})
    String token(@Header("Authorization") String authorization,@QueryMap Map<String,String> map);
}
